#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
#include <stdio.h>
void sigop(int signo, siginfo_t* info, void* context)
{
	printf("recv %d\n", signo);
}

int main()
{
	struct sigaction act, oact;
	act.sa_handler=sigop;
	sigemptyset(&act.sa_mask);
	act.sa_flags=SA_SIGINFO;
	if(sigaction(SIGUSR1, &act, &oact)<0)
	{
		perror("error");
		return 1;
	}
	while(1)
	{
		sleep(1);
		printf("Hello\n");
	}
	return 0;
}
